#ifndef _MEDIA_MEMORY_H_
#define _MEDIA_MEMORY_H_

#include "typedef.h"

enum audio_module {
    AUD_MODULE_DEFAULT = 0,
    //Effects Modules
    AUD_MODULE_ECHO,
    AUD_MODULE_REVERB,
    AUD_MODULE_REVERB_V2,
    AUD_MODULE_AUTOTUNE,
    AUD_MODULE_AUTOWAH,
    AUD_MODULE_CHORUS,
    AUD_MODULE_FREQ_SHIFT,
    AUD_MODULE_HARMONIC_EXCITER,
    AUD_MODULE_LLNS,
    AUD_MODULE_NOISEGATE,
    AUD_MODULE_HOWLING_GATE,
    AUD_MODULE_NOTCH_HOWLING,
    AUD_MODULE_PCM_DELAY,
    AUD_MODULE_PINGPONG,
    AUD_MODULE_PITCH,
    AUD_MODULE_PITCH_SPEED,
    AUD_MODULE_MTAPS_ECHO,
    AUD_MODULE_STEREO_WIDENER,
    AUD_MODULE_THREE_D,
    AUD_MODULE_SURROUND,
    AUD_MODULE_VBASS,
    AUD_MODULE_VOICE_CHANGER,
    AUD_MODULE_DRC,
    AUD_MODULE_DRC_ADV,
    AUD_MODULE_DYN_EQ,
    AUD_MODULE_DISTORTION,
    AUD_MODULE_NOISEGATE_PRO,
    AUD_MODULE_LIMITER,
    AUD_MODULE_REVERB_LITE,
    AUD_MODULE_VIRTUAL_SURROUND_PRO,
    AUD_MODULE_VIRTUAL_SURROUND_PRO_TMP,
    AUD_MODULE_SOFWARE_EQ,
    AUD_MODULE_SOFWARE_EQ_COEFF,
    AUD_MODULE_SOFWARE_EQ_SEG,
    AUD_MODULE_VIRTUAL_BASS_CLASSIC,
    AUD_MODULE_PHASER,
    AUD_MODULE_FLANGER,
    AUD_MODULE_CHORUS_ADVANCE,
    AUD_MODULE_PINGPONG_ECHO,
    AUD_MODULE_STEREO_SPATIAL_WIDER,
    AUD_MODULE_STEREO_SPATIAL_WIDER_TMP,
    AUD_MODULE_DISTORTION_CLIPPING,
    AUD_MODULE_FREQUENCY_COMPRESSOR,
    AUD_MODULE_SPATIAL_ADV,
    AUD_MODULE_SPATIAL_ADV_TMPBUF,
    AUD_MODULE_VIRTUAL_BASS_PRO,
    AUD_MODULE_VIRTUAL_BASS_PRO_TMPBUF,
    AUD_MODULE_MIXER,
    AUD_MODULE_LHDC_X,
    //Codec Modules
    AUD_MODULE_AAC,
    AUD_MODULE_AAC_ENERGY,
    AUD_MODULE_LC3_DEC,
    AUD_MODULE_LC3_ENC,
    AUD_MODULE_JLA_DEC,
    AUD_MODULE_JLA_ENC,
    AUD_MODULE_JLA_V2_DEC,
    AUD_MODULE_JLA_V2_ENC,
};

static const char *mm_module[] = {
    "Default",
    "Echo",
    "Reverb",
    "Reverb_v2",
    "Autotune",
    "Autowah",
    "Chorus",
    "FreqShift",
    "HarmonicExciter",
    "LLNS",
    "NoiseGate",
    "HowlingGate",
    "HowlingNotch",
    "PcmDelay",
    "PingPong",
    "Pitch",
    "PitchSpeed",
    "MTapsEcho",
    "StereoWide",
    "3D",
    "Surround",
    "Vbass",
    "VoiceChange",
    "DRC",
    "DRCAdv",
    "DynEQ",
    "Distortion",
    "NoiseGatePro",
    "Limiter",
    "ReverbLite",
    "VSurroundPro",
    "VSurroundProTmp",
    "SoftEQ",
    "SoftEqCoeff",
    "SoftEqSeg",
    "VbassClassic",
    "Phaser",
    "Flanger",
    "ChorusAdv",
    "PingPong_Echo",
    "StereoSpatialWide",
    "StereoSpatialWideTmp",
    "DistortionClip",
    "FreqCompress",
    "SpatialAdv",
    "SpatialAdvTmp",
    "VbassPro",
    "VbassProTmp",
    "Mixer",
    "LHDC_X",
    //Codec Modules
    "AAC_Dec",
    "AACEnergy",
    "LC3_Dec",
    "LC3_Enc",
    "JLA_Dec",
    "JLA_Enc",
    "JLAV2_Dec",
    "JLAV2_Enc",
    "InValid0", //非法模块名，存在模块名和模块序号对不上的情况
    "InValid1", //非法模块名，存在模块名和模块序号对不上的情况
    "InValid2", //非法模块名，存在模块名和模块序号对不上的情况
};


void *media_malloc(enum audio_module module, size_t size);
void media_free(void *pv);
void media_mem_unfree_dump();

#endif
